package design_1_factory.demo1;

import design_1_factory.demo1.factory.ComputeFactory;

/**
 * 调用简单工厂方法demo
 *
 * <p>
 * 使用场景：
 * </P>
 *
 * @author wangsong
 * @email 1720696548@qq.com
 * @date 2022/1/18 11:41
 */
public class RefrigeratorFactoryDemo {

	public static void main(String[] args) {
		// +1
		System.out.println(new ComputeFactory().compute("Add").compute(1));
		// -1
		System.out.println(new ComputeFactory().compute("Subtract").compute(1));
	}
}